{% extends "base.html" %}
{% block content %}

    {% if user.is_authenticated %}

        <div id="contentCreateExam">
            <h2>Create Exam</h2>
            <form action="/createExam/" method="post">
                <!-- Create Exam -->
                <label for="examName">Name: </label><br /><input type="text" id="examName" name="examName" placeholder="Required" required /><br />
                <p class="datepair">
                <label for="date_start">ExamStartDate: </label><br /><input type="text" name="examStart" id="date_start" class="date start" placeholder="Required" required /><br />
                <label for="date_end">ExamEndDime: </label><br /><input type="text" name="examEnd" id="date_end" class="date end" placeholder="Required" required /><br />
                <label for="time_start">TimeStart: </label><br /><input type="text" name="timeStart" id="time_start" class="time start" placeholder="Required" required /><br />
                <label for="time_end">TimeEnd: </label><br /><input type="text" name="timeEnd" id="time_end" class="time end" placeholder="Required" required /><br />
                </p>

                <!-- Create Questions -->
                <div id="list_exam_questions">
                    <ul id="q0_wrapper">
                        <li class="question" id="q0">
                            <label>Spurning 1</label><br />
                            <input type="text" name="question0" />
                            <input id="q0Hidden" type="hidden" value="0" />
                        </li>

                        <li>
                            <ul id="list_q0_answers">
                                <li id="q0_a1">
                                    <label>Svar 2</label><br />
                                    <input type="text" name="q0_answer1" />
                                    <input type="radio" name="rightAnswer_q0" value="1" />
                                    <input id="a1Hidden" type="hidden" value="1" />
                                </li>

                                <li id="q0_a2">
                                    <label>Svar 2</label><br />
                                    <input type="text" name="q0_answer2" />
                                    <input type="radio" name="rightAnswer_q0" value="2" />
                                    <input id="a2Hidden" type="hidden" value="2" />
                                 </li>

                            </ul>
                            <button class="bleh" onclick="alert(this)">+svar</button>
                        </li>
                    </ul>
                </div>
                <input type="button" id="addQuestion" value="+ spurning" /><input type="button" id="deleteQuestion" value="- spurning" disabled="disabled" /><br />

                <input id="saveForm" name="saveForm" type="submit" value="Submit"/>
            </form>
        </div>
    {% else %}
        <p>Welcome, new user. Please log in.</p>
    {% endif %}

{% endblock %}
